#!/usr/bin/env python
#  This is part of the Scopia data visualization example collection
#
#
#  Copyright (C) 2008  Scopia Visual Interfaces Systems 
#                      http://www.scopia.es
#
#  author: Alejandro Conty
#  contributors:
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.

import datetime
import random
starttime = datetime.datetime(2008, 2, 1)

dayrange = 30
secondrange = 24*3600

print "idfrom, idto, type, amount, year, month, day, hour, minute, second"
for i in xrange(1000):
    idfrom = random.randint(0, 29) 
    idto =   random.randint(0, 29)
    while idto == idfrom: idto =   random.randint(0, 29)
    if idfrom % 2 == 0 and idto % 2 == 0:
        amount = random.randint(10, 100)
    else:
        amount = random.randint(1, 10)
    delta = datetime.timedelta( random.randint(1, dayrange), random.randint(0, secondrange) )
    time = starttime + delta
    print ", ".join( [ str(e) for e in [ idfrom, idto, 'V', amount, time.year, time.month, time.day, time.hour, time.minute, time.second]] )

